#pragma once
#include <iostream>
#include "cocos2d.h"

using namespace std;
using namespace cocos2d;

class PhaseManage
{
	PhaseManage();
	~PhaseManage();

	static PhaseManage* s_pPhaseManage;

	int m_nState;
	bool m_bNewGame;
	int m_nBuyRound;
	int m_nSellRound;
	bool m_bIsPlayerRound = false;

	void playerBuyHourse();
	void playerSellHourse();

public:
	enum
	{
		BuyPhase = 0,
		SellPhase = 1
	};

	static PhaseManage* getInstance();

	void start();
	void next();
	void end();

	inline int getCurrentPhase() { return m_nState; }
	inline int getBuyRound() { return m_nBuyRound; }
	inline int getSellRound() { return m_nSellRound; }

	inline bool getIsPlayerRound() { return m_bIsPlayerRound; }
	inline void setIsPlayerRound(bool isPlayerRound) { m_bIsPlayerRound = isPlayerRound; }
};

